From b061821f247c62e776cf97389886d30664021ae4 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 18 Nov 2018 13:36:50 +0100 Subject: [PATCH] g-i: Add some nullable annotations Based on grepping arg docs for NULL. See https://gitlab.gnome.org/GNOME/pygobject/issues/261 --- gdk/x11/gdkcursor-x11.c | 2 +- gdk/x11/gdkdisplay-x11.c | 4 ++-- gtk/gtkactionable.c | 2 +- gtk/gtkpagesetup.c | 2 +- gtk/gtkpapersize.c | 2 +- gtk/gtkprintsettings.c | 2 +- gtk/gtktreeselection.c | 2 +- gtk/gtktreeview.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 6f94511cde..e0de28ed90 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -261,7 +261,7 @@ gdk_x11_cursor_create_for_name (GdkDisplay *display, /** * gdk_x11_display_set_cursor_theme: * @display: (type GdkX11Display): a #GdkDisplay - * @theme: the name of the cursor theme to use, or %NULL to unset + * @theme: (nullable): the name of the cursor theme to use, or %NULL to unset * a previously set value * @size: the cursor size to use, or 0 to keep the previous size * diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 3dc613fc82..848e41f68c 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2822,8 +2822,8 @@ gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display) /** * gdk_x11_set_sm_client_id: - * @sm_client_id: the client id assigned by the session manager when the - * connection was opened, or %NULL to remove the property. + * @sm_client_id: (nullable): the client id assigned by the session manager + * when the connection was opened, or %NULL to remove the property. * * Sets the `SM_CLIENT_ID` property on the application’s leader window so that * the window manager can save the application’s state using the X11R6 ICCCM diff --git a/gtk/gtkactionable.c b/gtk/gtkactionable.c index f25cfd92dd..58c7d459cd 100644 --- a/gtk/gtkactionable.c +++ b/gtk/gtkactionable.c @@ -144,7 +144,7 @@ gtk_actionable_get_action_target_value (GtkActionable *actionable) /** * gtk_actionable_set_action_target_value: * @actionable: a #GtkActionable widget - * @target_value: a #GVariant to set as the target value, or %NULL + * @target_value: (nullable): a #GVariant to set as the target value, or %NULL * * Sets the target value of an actionable widget. * diff --git a/gtk/gtkpagesetup.c b/gtk/gtkpagesetup.c index 0769b8aeac..b84e7e21e3 100644 --- a/gtk/gtkpagesetup.c +++ b/gtk/gtkpagesetup.c @@ -748,7 +748,7 @@ enum_to_string (GType type, * gtk_page_setup_to_key_file: * @setup: a #GtkPageSetup * @key_file: the #GKeyFile to save the page setup to - * @group_name: the group to add the settings to in @key_file, + * @group_name: (nullable): the group to add the settings to in @key_file, * or %NULL to use the default name “Page Setup” * * This function adds the page setup from @setup to @key_file. diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index d107a7d0be..2a39bec8d0 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -911,7 +911,7 @@ gtk_paper_size_get_default_right_margin (GtkPaperSize *size, /** * gtk_paper_size_new_from_key_file: * @key_file: the #GKeyFile to retrieve the papersize from - * @group_name: the name ofthe group in the key file to read, + * @group_name: (nullable): the name of the group in the key file to read, * or %NULL to read the first group * @error: (allow-none): return location for an error, or %NULL * diff --git a/gtk/gtkprintsettings.c b/gtk/gtkprintsettings.c index 89854cf523..65104bcd19 100644 --- a/gtk/gtkprintsettings.c +++ b/gtk/gtkprintsettings.c @@ -1766,7 +1766,7 @@ add_value_to_key_file (const gchar *key, * gtk_print_settings_to_key_file: * @settings: a #GtkPrintSettings * @key_file: the #GKeyFile to save the print settings to - * @group_name: the group to add the settings to in @key_file, or + * @group_name: (nullable): the group to add the settings to in @key_file, or * %NULL to use the default “Print Settings” * * This function adds the print settings from @settings to @key_file. diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c index 8ed022a5cd..a3ffdc0258 100644 --- a/gtk/gtktreeselection.c +++ b/gtk/gtktreeselection.c @@ -374,7 +374,7 @@ gtk_tree_selection_get_mode (GtkTreeSelection *selection) /** * gtk_tree_selection_set_select_function: * @selection: A #GtkTreeSelection. - * @func: The selection function. May be %NULL + * @func: (nullable): The selection function. May be %NULL * @data: The selection function’s data. May be %NULL * @destroy: The destroy function for user data. May be %NULL * diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 036e66cbdc..2bf18710b8 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -11213,7 +11213,7 @@ gtk_tree_view_move_column_after (GtkTreeView *tree_view, /** * gtk_tree_view_set_expander_column: * @tree_view: A #GtkTreeView - * @column: %NULL, or the column to draw the expander arrow at. + * @column: (nullable): %NULL, or the column to draw the expander arrow at. * * Sets the column to draw the expander arrow at. It must be in @tree_view. * If @column is %NULL, then the expander arrow is always at the first -- 2.30.2